package com.leoman.plz_p.adapter;

import android.content.Context;
import android.graphics.Color;
import android.widget.TextView;

import com.leoman.plz_p.R;
import com.leoman.plz_p.module.bean.TestExamBean;

import cn.com.corelib.utils.adapter.BaseAdapterHelper;
import cn.com.corelib.utils.adapter.normal.QuickAdapter;

/**
 * Created by guoh on 2018/8/26.
 */
public class StudyAdapter extends QuickAdapter<TestExamBean>{
    public StudyAdapter(Context context) {
        super(context, R.layout.item_study_exam);
    }

    @Override
    protected void convert(BaseAdapterHelper helper, TestExamBean item, int position) {
        helper.setText(R.id.tv_text,item.getTitle());
        if (item.getStatus()==1){
            ((TextView)helper.getView(R.id.tv_text)).setTextColor(Color.parseColor("#999999"));
        }else {
            ((TextView)helper.getView(R.id.tv_text)).setTextColor(Color.BLACK);
        }
    }
}
